const express = require('express');
// 创建路由对象
const router = express.Router();

router.get('/user/list', (req, res) => {
  res.send('Get user list');
});

router.post('/user/add', (req, res) => {
  res.send('Add user');
});

// 向外导出路由对象
module.exports = router;

// const app = express();

// app.get('/', function (req, res) {
//   res.send('Get request to the homepage');
// });
// app.post('/', function (req, res) {
//   res.send('Post request to the homepage');
// });

// app.listen(3000, function () {
//   console.log('Example app listening on port 3000!');
// });